using FriendStar.Code;
using FriendStar.Domain.Entity.VBaseData;
using FriendStar.Domain.IRepository.VBaseData;
using FriendStar.Repository.VBaseData;
using System.Collections.Generic;
using System.Linq;
using SqlSugarRepository;


namespace FriendStar.Application.VBaseData
{
    public class V_Sys_UserApp
    {
        private IV_Sys_UserRepository service = new V_Sys_UserRepository();
        public List<V_Sys_UserEntity> GetList(string IdorName)
        {
            var expression = ExtLinq.True<V_Sys_UserEntity>();
            if(!string.IsNullOrEmpty(IdorName))
            {
                expression = expression.And(p => p.F_Account.Contains(IdorName) || p.F_RoleName.Contains(IdorName));
            }
            return service.IQueryable(expression).ToList();
        }
    }
}
